/**
 * Permission数据传输对象
 *
 * @author sxf
 * @email sxf02615@163.com
 * @date 2025/1/15
 */
package com.sxf.crm.dto;


import com.sxf.crm.core.entity.Permission;
import lombok.Data;


import org.springframework.beans.BeanUtils;

/**
 * 权限数据传输对象
 * 
 * <p>用于权限相关的数据传输</p>
 * 
 * @author sxf
 * @email sxf02615@163.com
 * @date 2025/6/1
 */
@Data
public class PermissionDTO extends Permission{
   
    public static PermissionDTO fromEntity(Permission permission) {
        if (permission == null) {
            return null;
        }
        PermissionDTO dto = new PermissionDTO();
        BeanUtils.copyProperties(permission, dto);
        return dto;
    }
}
